<!doctype html>
<html class="default no-js">
<head>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<title>@xbb/xbb-utils</title>
	<meta name="description" content="Documentation for @xbb/xbb-utils">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<link rel="stylesheet" href="assets/css/main.css">
</head>
<body>
<header>
	<div class="tsd-page-toolbar">
		<div class="container">
			<div class="table-wrap">
				<div class="table-cell" id="tsd-search" data-index="assets/js/search.json" data-base=".">
					<div class="field">
						<label for="tsd-search-field" class="tsd-widget search no-caption">Search</label>
						<input id="tsd-search-field" type="text" />
					</div>
					<ul class="results">
						<li class="state loading">Preparing search index...</li>
						<li class="state failure">The search index is not available</li>
					</ul>
					<a href="index.html" class="title">@xbb/xbb-utils</a>
				</div>
				<div class="table-cell" id="tsd-widgets">
					<div id="tsd-filter">
						<a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a>
						<div class="tsd-filter-group">
							<div class="tsd-select" id="tsd-filter-visibility">
								<span class="tsd-select-label">All</span>
								<ul class="tsd-select-list">
									<li data-value="public">Public</li>
									<li data-value="protected">Public/Protected</li>
									<li data-value="private" class="selected">All</li>
								</ul>
							</div>
							<input type="checkbox" id="tsd-filter-inherited" checked />
							<label class="tsd-widget" for="tsd-filter-inherited">Inherited</label>
							<input type="checkbox" id="tsd-filter-externals" checked />
							<label class="tsd-widget" for="tsd-filter-externals">Externals</label>
							<input type="checkbox" id="tsd-filter-only-exported" />
							<label class="tsd-widget" for="tsd-filter-only-exported">Only exported</label>
						</div>
					</div>
					<a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a>
				</div>
			</div>
		</div>
	</div>
	<div class="tsd-page-title">
		<div class="container">
			<ul class="tsd-breadcrumb">
				<li>
					<a href="globals.html">Globals</a>
				</li>
			</ul>
			<h1>@xbb/xbb-utils</h1>
		</div>
	</div>
</header>
<div class="container container-main">
	<div class="row">
		<div class="col-8 col-content">
			<div class="tsd-panel tsd-typography">
				<a href="#utils" id="utils" style="color: inherit; text-decoration: none;">
					<h1>utils</h1>
				</a>
				<p><a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue.svg" alt="License"></a>
					<a href="https://gitee.com/bestjarvan/utils/pulls"><img src="https://img.shields.io/badge/PRs-welcome-brightgreen.svg" alt="PRs Welcome"></a>
				<a href="https://www.npmjs.com/package/@jarvannnn/utils"><img src="https://img.shields.io/bundlephobia/min/@jarvannnn/utils/0.0.11" alt="npm"></a></p>
				<p>xbb工具包总合</p>
				<p><a href="http://xbb_frontend.gitee.io/xbb-utils/">doc文档</a></p>
				<a href="#使用说明" id="使用说明" style="color: inherit; text-decoration: none;">
					<h4>使用说明</h4>
				</a>
				<pre><code><span class="hljs-regexp">//</span> 通过npm安装
npm i --save xbb-utils</code></pre>
				<a href="#调试说明" id="调试说明" style="color: inherit; text-decoration: none;">
					<h4>调试说明</h4>
				</a>
				<pre><code><span class="hljs-built_in">npm</span> i

<span class="hljs-built_in">npm</span> run serve</code></pre>
				<a href="#文件目录" id="文件目录" style="color: inherit; text-decoration: none;">
					<h4>文件目录</h4>
				</a>
				<pre><code>.
├── LICENSE
├── README.md
├── babel.config.js
├── coverage <span class="hljs-regexp">//</span> 单测结果
│   └── lcov-report
│       └── src
│           └── index.html <span class="hljs-regexp">//</span> 单测结果页面入口
├── docs <span class="hljs-regexp">//</span> typedoc生成的文档
│   ├── assets
│   ├── globals.html
│   ├── index.html
│   └── interfaces
├── gulpfile.js <span class="hljs-regexp">//</span> gulp+rollup配置文件
├── package.json
├── src <span class="hljs-regexp">//</span> 代码模块
│   ├── core <span class="hljs-regexp">//</span> 核心代码块
│   │   ├── env.ts
│   │   └── **.ts
│   ├── index.ts <span class="hljs-regexp">//</span> 入口文件
│   ├── tools
│   │   └── index.ts <span class="hljs-regexp">//</span> 工具
│   └── types <span class="hljs-regexp">//</span> 声明文件
│       └── index.ts <span class="hljs-regexp">//</span> interface
├── tests <span class="hljs-regexp">//</span> 单元测试
│   └── unit <span class="hljs-regexp">//</span> 核心测试模块
├── home <span class="hljs-regexp">//</span> vue调试页面
│   └── ** <span class="hljs-regexp">//</span> 调试
├── vue.config.js <span class="hljs-regexp">//</span> vue项目配置(调试用)
├── jest.config.js <span class="hljs-regexp">//</span> jest单测配置
├── tsconfig.json <span class="hljs-regexp">//</span> ts配置
├── tslint.json <span class="hljs-regexp">//</span> tslint配置
├── .prettierrc <span class="hljs-regexp">//</span> prettier配置
├── .lintstagedrc <span class="hljs-regexp">//</span> lintstage配置
└── typedoc.json <span class="hljs-regexp">//</span> typedoc配置
</code></pre>
				<a href="#100测试通过率" id="100测试通过率" style="color: inherit; text-decoration: none;">
					<h4>100%测试通过率</h4>
				</a>
				<pre><code>&gt; jest --coverage

 PASS  test/core/verify.spec.ts
 PASS  test/core/is.spec.ts
 PASS  test/core/env.spec.ts
 PASS  test/index.spec.ts
 PASS  test/core/format.spec.ts
 PASS  test/core/date.spec.ts
 PASS  test/core/method.spec.ts
------------|<span class="hljs-string">---------</span>|<span class="hljs-string">----------</span>|<span class="hljs-string">---------</span>|<span class="hljs-string">---------</span>|<span class="hljs-string">-------------------
File        </span>|<span class="hljs-string"> % Stmts </span>|<span class="hljs-string"> % Branch </span>|<span class="hljs-string"> % Funcs </span>|<span class="hljs-string"> % Lines </span>|<span class="hljs-string"> Uncovered Line #s 
------------</span>|<span class="hljs-string">---------</span>|<span class="hljs-string">----------</span>|<span class="hljs-string">---------</span>|<span class="hljs-string">---------</span>|<span class="hljs-string">-------------------
All files   </span>|<span class="hljs-string">     100 </span>|<span class="hljs-string">      100 </span>|<span class="hljs-string">     100 </span>|<span class="hljs-string">     100 </span>|<span class="hljs-string">                   
 src        </span>|<span class="hljs-string">     100 </span>|<span class="hljs-string">      100 </span>|<span class="hljs-string">     100 </span>|<span class="hljs-string">     100 </span>|<span class="hljs-string">                   
  index.ts  </span>|<span class="hljs-string">     100 </span>|<span class="hljs-string">      100 </span>|<span class="hljs-string">     100 </span>|<span class="hljs-string">     100 </span>|<span class="hljs-string">                   
 src/core   </span>|<span class="hljs-string">     100 </span>|<span class="hljs-string">      100 </span>|<span class="hljs-string">     100 </span>|<span class="hljs-string">     100 </span>|<span class="hljs-string">                   
  date.ts   </span>|<span class="hljs-string">     100 </span>|<span class="hljs-string">      100 </span>|<span class="hljs-string">     100 </span>|<span class="hljs-string">     100 </span>|<span class="hljs-string">                   
  env.ts    </span>|<span class="hljs-string">     100 </span>|<span class="hljs-string">      100 </span>|<span class="hljs-string">     100 </span>|<span class="hljs-string">     100 </span>|<span class="hljs-string">                   
  format.ts </span>|<span class="hljs-string">     100 </span>|<span class="hljs-string">      100 </span>|<span class="hljs-string">     100 </span>|<span class="hljs-string">     100 </span>|<span class="hljs-string">                   
  is.ts     </span>|<span class="hljs-string">     100 </span>|<span class="hljs-string">      100 </span>|<span class="hljs-string">     100 </span>|<span class="hljs-string">     100 </span>|<span class="hljs-string">                   
  method.ts </span>|<span class="hljs-string">     100 </span>|<span class="hljs-string">      100 </span>|<span class="hljs-string">     100 </span>|<span class="hljs-string">     100 </span>|<span class="hljs-string">                   
  verify.ts </span>|<span class="hljs-string">     100 </span>|<span class="hljs-string">      100 </span>|<span class="hljs-string">     100 </span>|<span class="hljs-string">     100 </span>|<span class="hljs-string">                   
 src/tools  </span>|<span class="hljs-string">     100 </span>|<span class="hljs-string">      100 </span>|<span class="hljs-string">     100 </span>|<span class="hljs-string">     100 </span>|<span class="hljs-string">                   
  index.ts  </span>|<span class="hljs-string">     100 </span>|<span class="hljs-string">      100 </span>|<span class="hljs-string">     100 </span>|<span class="hljs-string">     100 </span>|<span class="hljs-string">                   
------------</span>|<span class="hljs-string">---------</span>|<span class="hljs-string">----------</span>|<span class="hljs-string">---------</span>|<span class="hljs-string">---------</span>|<span class="hljs-string">-------------------

Test Suites: 7 passed, 7 total
Tests:       57 passed, 57 total
Snapshots:   0 total
Time:        3.985s, estimated 4s
Ran all test suites.</span></code></pre>
				<a href="#版本说明" id="版本说明" style="color: inherit; text-decoration: none;">
					<h4>版本说明</h4>
				</a>
				<pre><code>----------<span class="hljs-string">|------------------------</span>
版本号     <span class="hljs-string">|  备注</span>
----------<span class="hljs-string">|------------------------</span>
v0.<span class="hljs-number">0.1</span>    <span class="hljs-string">| 基础搭建</span>
v0.<span class="hljs-number">1.0</span>    <span class="hljs-string">| 新增vue2.x调试</span>
v0.<span class="hljs-number">1.2</span>    <span class="hljs-string">| 修复bug，维护更新</span>
v1.<span class="hljs-number">1.0</span>    <span class="hljs-string">| 优化math方法，新增thumbnail, formatToNumber, dealNumber, getGuid方法</span>
v1.<span class="hljs-number">1.1</span>    <span class="hljs-string">| 开启命名空间</span>
v1.<span class="hljs-number">1.2</span>    <span class="hljs-string">| 修复thumbnail方法判断，若传入空数组报错的bug</span>
v1.<span class="hljs-number">1.3</span>    <span class="hljs-string">| 修复throttle、debounce，标识变量移动到函数内部，thumbnail方法支持更大图片格式</span>
v1.<span class="hljs-number">1.5</span>    <span class="hljs-string">| 新增方法，正常迭代</span>
v1.<span class="hljs-number">2.0</span>    <span class="hljs-string">| 新增isWxImg，envInfo，isThirdPC方法，兼容多平台和企微头像识别</span>
v1.<span class="hljs-number">2.1</span>    <span class="hljs-string">| 修复toFixed方法遇见0.1浮点数计算精度出错问题</span>
v1.<span class="hljs-number">2.3</span>    <span class="hljs-string">| 拓展thumbnail方法</span>
v1.<span class="hljs-number">3.0</span>    <span class="hljs-string">| 植入lodash方法</span>
v1.<span class="hljs-number">3.3</span>    <span class="hljs-string">| 拓展lodash方法</span>
v1.<span class="hljs-number">3.4</span>    <span class="hljs-string">| 节流防抖，新增修饰符</span>
v1.<span class="hljs-number">3.5</span>    <span class="hljs-string">| envInfo，isThirdPC优化展示方法，返回当前环境</span>
v1.<span class="hljs-number">3.6</span>    <span class="hljs-string">| thumbnail: 支持API 导入进来的图片不渲染缩略图</span>
v1.<span class="hljs-number">4.0</span>    <span class="hljs-string">| hexToRgba: 新增16进制转rgba方法</span>
v1.<span class="hljs-number">4.1</span>    <span class="hljs-string">| thumbnail: 新增1080</span>
----------<span class="hljs-string">|------------------------</span></code></pre>
				<a href="#参与贡献" id="参与贡献" style="color: inherit; text-decoration: none;">
					<h4>参与贡献</h4>
				</a>
				<ol>
					<li>新建 feature/xxx 分支</li>
					<li>提交代码</li>
					<li>新建 Merge Request</li>
				</ol>
			</div>
		</div>
		<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
			<nav class="tsd-navigation primary">
				<ul>
					<li class="globals  ">
						<a href="globals.html"><em>Globals</em></a>
					</li>
				</ul>
			</nav>
			<nav class="tsd-navigation secondary menu-sticky">
				<ul class="before-current">
					<li class=" tsd-kind-interface">
						<a href="interfaces/datefromat.html" class="tsd-kind-icon">Datefromat</a>
					</li>
					<li class=" tsd-kind-interface">
						<a href="interfaces/format.html" class="tsd-kind-icon">Format</a>
					</li>
					<li class=" tsd-kind-interface">
						<a href="interfaces/index.html" class="tsd-kind-icon">Index</a>
					</li>
					<li class=" tsd-kind-interface">
						<a href="interfaces/is.html" class="tsd-kind-icon">Is</a>
					</li>
					<li class=" tsd-kind-interface">
						<a href="interfaces/lodashtool.html" class="tsd-kind-icon">Lodash<wbr>Tool</a>
					</li>
					<li class=" tsd-kind-interface">
						<a href="interfaces/math.html" class="tsd-kind-icon">Math</a>
					</li>
					<li class=" tsd-kind-interface">
						<a href="interfaces/method.html" class="tsd-kind-icon">Method</a>
					</li>
					<li class=" tsd-kind-interface">
						<a href="interfaces/url.html" class="tsd-kind-icon">Url</a>
					</li>
					<li class=" tsd-kind-interface">
						<a href="interfaces/uuid.html" class="tsd-kind-icon">Uuid</a>
					</li>
					<li class=" tsd-kind-interface">
						<a href="interfaces/verify.html" class="tsd-kind-icon">Verify</a>
					</li>
				</ul>
			</nav>
		</div>
	</div>
</div>
<footer class="with-border-bottom">
	<div class="container">
		<h2>Legend</h2>
		<div class="tsd-legend-group">
			<ul class="tsd-legend">
				<li class="tsd-kind-method tsd-parent-kind-interface"><span class="tsd-kind-icon">Method</span></li>
			</ul>
		</div>
	</div>
</footer>
<div class="container tsd-generator">
	<p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p>
</div>
<div class="overlay"></div>
<script src="assets/js/main.js"></script>
</body>
</html>